package com.graduation.vaccine.controller;


import com.graduation.vaccine.service.VaccineCatalogService;
import com.graduation.vaccine.vo.RespBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ZhaoJunYao
 * @since 2022-04-20
 */
@RestController
@RequestMapping("/vaccine/catalog")
@Api(tags = "疫苗类别模块")
public class VaccineCatalogController {
    @Autowired
    private VaccineCatalogService vaccineCatalogService;

    @ApiOperation("首页展示疫苗列表  需获取每个catalog的 id name iconUrl tag ")
    @GetMapping("/all")
    @ResponseBody
    public RespBean getAll(){
        return vaccineCatalogService.getAll("all");
    }

    @ApiOperation("获取各个catalog的id name imgUrl  moreUrl iconUr")
    @GetMapping("/all/info")
    @ResponseBody
    public RespBean getInfoByCatalogId(){
        return vaccineCatalogService.getAll("more");
    }


}
